var router = require('koa-router')();
var service = require('./service/webAppService');
var views = require('co-views');
var render = views('./view', {map : {html : 'ejs'}});


router.get('/route_test', async function (ctx, next){
  ctx.body = "Hello, Koa!";
});

router.get('/ejs_test', async function (ctx, next){
  ctx.body = await render('test', {title: 'ejs title'});
});

router.get('/ajax/search', service.get_search_data);

module.exports = router;